[][src]Crate tiny_keccak

Keccak derived functions specified in FIPS-202, SP800-185 and KangarooTwelve.

Example

let input_a = b"hello world";
let input_b = b"!";
let mut output = [0u8; 32];
hasher.update(input_a);
hasher.update(input_b);
hasher.finalize(&mut output);

Credits

License

CC0. Attribution kindly requested. Blame taken too, but not liability.

Structs

CShake

The cSHAKE extendable-output functions defined in SP800-185.

KangarooTwelve

The KangarooTwelve hash function defined here.

KangarooTwelveXof

The KangarooTwelve extendable-output function defined here.

Keccak

The Keccak hash functions defined in Keccak SHA3 submission.

Kmac

The KMAC pseudo-random functions defined in SP800-185.

KmacXof

The KMACXOF extendable-output functions defined in SP800-185.

ParallelHash

The ParallelHash hash functions defined in SP800-185.

ParallelHashXof

The ParallelHashXOF extendable-output functions defined in SP800-185.

Sha3

The SHA3 hash functions defined in FIPS-202.

Shake

The SHAKE extendable-output functions defined in FIPS-202.

TupleHash

The TupleHash hash functions defined in SP800-185.

TupleHashXof

The TupleHashXOF extendable-output functions defined in SP800-185.

Traits

Hasher

A trait for hashing an arbitrary stream of bytes.

IntoXof

A trait used to convert Hasher into it's Xof counterpart.

Xof

Extendable-output function (XOF) is a function on bit strings in which the output can be extended to any desired length.

Functions

keccakf

keccak-f[1600, 24]

keccakp

keccak-p[1600, 12]